/**
 * 
 */
package Controller;

import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;

/**
 * @author enzo
 *
 */
public class SelectionListener implements ListSelectionListener {
	private AgendaManager agenda;
	
	/**
	 * @param a
	 */
	public SelectionListener(AgendaManager a)
	{
		agenda=a;
	}
	/* (non-Javadoc)
	 * @see javax.swing.event.ListSelectionListener#valueChanged(javax.swing.event.ListSelectionEvent)
	 */
	@Override
	public void valueChanged(ListSelectionEvent e) {
		// TODO Auto-generated method stub
		 if (e.getValueIsAdjusting()) {
			 agenda.displayContact();
		 }
	}

}
